<?php
/**
 * 管理后台首页
 * @file		IndexControl.class.php
 * @author     	itkele@gmail.com
 * @date       	2013-01-10
 * modify       
 */
class IndexControl extends Control{
	
	public function __construct(){
		parent::__construct();
		
		//子菜单
		$submenu = array(
			array(
				'alias' => 'menuList',
				'title' => '菜单列表',
				'url'	=> C('site_admin') . 'index.php?a=menu&m=menuList',
			),
			array(
				'alias' => 'addMenu',
				'title' => '添加菜单',
				'url'	=> C('site_admin') . 'index.php?a=menu&m=addMenu',
			),
		);

		$submenu = array();//debug
		
		$this->assign('mainMenu','index');
		$this->assign('submenu',$submenu);
	}
	
	public function index(){
		$siteInfo = M('Siteinfo')->getSiteInfo();

		$this->assign('title','');
		$this->assign('siteInfo',$siteInfo);
		$this->display('site_info');
	}
	
	public function login(){
		
	}
	
	public function logout(){
		unset($_SESSION['cloud_app']['admin']);
		header('Location: index.php');
	}
	
}